package com.etc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
 * cyf 用于规划路线的控制器，将页面景点信息传过来，通过调用高德api处理返回结果
 * @author Administrator
 *
 */
@Controller
@RequestMapping("routeapi")
public class RoutePlanController {
	
	@RequestMapping("routeplan")
	public String routeplan() {
		return "search";
	}
	
	@RequestMapping(value = "route", method = RequestMethod.POST)
	public String test(String begin, String end, String way, String way2,String way3,Model model) {
		model.addAttribute("begin", begin);
		model.addAttribute("end", end);
		model.addAttribute("way", way);
		model.addAttribute("way2", way2);
		model.addAttribute("way3", way3);
		// 指定返回视图名字
		return "routeplanner";
	}
	
}
